package org.crazyit.booksys.action;

import java.io.File;

import org.crazyit.component.FileuploadImpl;

import com.opensymphony.xwork2.ActionSupport;

public class UploadfileAction extends ActionSupport {
	private FileuploadImpl fileuploadImpl;
	private File upload;
	private String uploadContentType;
	private String uploadFileName;
	
	public void setFileuploadImpl(FileuploadImpl fileuploadImpl) {
		this.fileuploadImpl = fileuploadImpl;
		
	}
	public File getUpload() {
		return upload;
	}
	public void setUpload(File upload) {
		this.upload = upload;
	}
	public String getUploadContentType() {
		return uploadContentType;
	}
	public void setUploadContentType(String uploadContentType) {
		this.uploadContentType = uploadContentType;
	}
	public String getUploadFileName() {
		return uploadFileName;
	}
	public void setUploadFileName(String uploadFileName) {
		this.uploadFileName = uploadFileName;
	}
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		fileuploadImpl.fileupload(this.getUpload(), this.getUploadFileName());
		return SUCCESS;
	}
	
}
